const {Controller}=require("egg")

class getViewIdentity extends Controller{
    async setViewIdentity(){
        const {ctx}=this
        const {type_id,views_id}=ctx.request.body
        const result=await ctx.service.authViewsIdentity.setViewIdentity(type_id,views_id)
        if(result.affectedRows){
            ctx.body={
                code:"1001",
                msg:"身份视图权限设置成功"
            }
        }else{
            ctx.body={
                code:"1002",
                msg:"身份视图权限设置失败"
            }
        }
    }
}

module.exports=getViewIdentity